1, i = = i + 1A number never equals its own plus 1? Java enforcement requires the use of IEEE 754 floating-point arithmetic operations [IEEE 754], which allows you to represent infinity with a double or float. As we learned in school, Infinity plus 1
5.2 infinity and Nan
IEEE 754 floating point numbers can represent positive or negative infinity, andNan(Not a number ). these three values arise from calculations whose result is undefined or cannot be represented accurately. you can also
Infinity and Nan ProblemsYou want to create or test floating-point numbers with positive infinity, negative infinity, or Nan (not a number).Solution SolutionsPython does not have a special syntax to represent these special floating-point values, but
NaN is an abbreviation for not a number. It is a numeric type value, typically in a floating-point calculation, that represents a value that is undefined or cannot be represented. Also, you cannot use the equality operator (= =) to check NaN. In the
This NaN is not NaN:
The program code is as follows:Copy codeThe Code is as follows: var date = new Date (d );If (! Date |! Date. getFullYear ){Return;
}Return S. Date. format (d, 'yyyy-mm-dd'); // The formatting function, which has nothing to
This NaN is not NaN:The program code is as follows:Copy codeThe Code is as follows:Var date = new Date (d );If (! Date |! Date. getFullYear ){Return;}Return S. Date. format (d, 'yyyy-mm-dd'); // The formatting function, which has nothing to do with
Nan, meaning not a nnmber. The main purpose of introducing this numeric type variable in Javascript is to control the situation where "a number is returned but no number is returned. For example, if a number is divided by 0, errors may occur in many
1. Type analysis:JS data types have undefined,boolean,number,string,object, such as 5, the first 4 are the original type, the 5th is the reference type.CodeCode highlighting produced by Actipro Codehighlighter (freeware)
JS determines the undefined type
Today, when showmodaldialog is used to open the page and return values. When you click the close button on the page or click Close in the browser, the returned value is undefined.Therefore, smart judgmentVaR revalue
1. Type analysis:JS data types have undefined,boolean,number,string,object, such as 5, the first 4 are the original type, the 5th is the reference type.var A1;var a2 = true;var a3 = 1;var a4 = "Hello";var A5 = new Object ();var a6 = null;var a7 =
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.